package com.coffee.takeoutserver.service.impl;

import com.coffee.takeoutserver.bean.Seller;
import com.coffee.takeoutserver.bean.SellerExample;
import com.coffee.takeoutserver.dao.SellerMapper;
import com.coffee.takeoutserver.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
class HomeServiceImpl implements HomeService {
    @Autowired
    private SellerMapper sellerMapper;

    @Override
    public List<Seller> home() {
        SellerExample sellerExample = new SellerExample();
        sellerExample.setOrderByClause("id desc");
        return sellerMapper.selectByExample(sellerExample);
    }
}
